﻿<?php 

use yii\widgets\ActiveForm;
use yii\helpers\Html;


?>

<!-- #alter dialog-message -->

<div id="dialog-alter" class="hide"   >
	
	<?php  
	    /*@var $form yii\widgets\ActiveForm */
		$form = ActiveForm::begin(['enableClientScript'=>true,
						  		   'options'=>[
										'class'=>'form-horizontal',
										'enctype'=>'multipart/form-data',
										'id'=>'alterd'
									 ],
								  ]);

	?>
	
	<div style="height: 20px" ></div>
	<div class='col-sm-6' >
		<?= $form->field($model,"deliveryName",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',
												'margin-left'=>'10px',
												'float'=>'left',
												'width'=>'60px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['id'=>'deliveryname','value'=>$deliveryName,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px',]]) ?>
	</div>
	<div class='col-sm-6' >
	<?= $form->field($model,"deliveryAb",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',
												'margin-left'=>'10px',
												'float'=>'left',
												'width'=>'90px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['id'=>'deliveryab','readonly'=>'readonly','value'=>$deliveryID,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px',]]) ?>
	</div>
	
	<div class='col-sm-6' >
	<?= $form->field($model,"linkName",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',
												'margin-left'=>'10px',
												'float'=>'left',
												'width'=>'60px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['value'=>$linkName,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px',]]) ?>
	</div>
	<div class='col-sm-6' >
	<?= $form->field($model,"linkTel",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',
												'margin-left'=>'10px',
												'float'=>'left',
												'width'=>'90px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['value'=>$linkTel,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px',]]) ?>
	</div>
	<div class='col-sm-6' style="margin-top:0px" >
		<?= $form->field($model,"address",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',
												'float'=>'left',
												'width'=>'70px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['value'=>$address,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px',]]) ?>
	</div>
	<div class='col-sm-6' style="margin-top:0px" >
		<?= $form->field($model,"qq",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>	',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',												
												'float'=>'left',
												'width'=>'100px',
												'height'=>'34px',
												'line-height'=>'34px'
										],'errorOptions'=>['class'=>'help-block middle']],
										
									])->textInput(['value'=>$qq,'class'=>'col-xs-10 col-sm-5','style'=>['margin-left'=>'10px']]) ?>
	</div>		
	
	<div class='col-sm-6'  >
	<?= $form->field($model,"email",[
										'template'=>'{label}{input}{hint}<span class="help-inline col-xs-12 col-sm-7">{error}</span>',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',											
												'float'=>'left',
												'width'=>'70px',
												'height'=>'34px',
												'line-height'=>'34px'
										]],
										
									])->textInput(['value'=>$email,'class'=>'col-xs-10 col-sm-6','style'=>['margin-left'=>'10px',]]) ?>
	
	</div>
	<?php 
			
	   //根据订单状态判断是否需要显示修改商品信息
	   if($state == 1){	
				 	
			echo  '<div class=\'col-sm-6\' >';
			echo  $form->field($model,"state",[
										'template'=>'{label}{input}<span class="lbl" style="margin-top:5px" ></span>',
										'labelOptions'=>[
											'style'=>[
												'text-align'=>'right',												
												'float'=>'left',
												'width'=>'90px',
												'height'=>'34px',
												'line-height'=>'34px',
												'margin-right'=>'10px',
										]],
										
									])->input("checkbox",['class'=>'ace ace-switch ace-switch-4','checked'=>'on']) ;
			echo '</div>';
  
		}else{

			echo  '<div class=\'col-sm-6\' >';
			echo  $form->field($model,"state",[
					'template'=>'{label}{input}<span class="lbl" style="margin-top:5px" ></span>',
					'labelOptions'=>[
					'style'=>[
					'text-align'=>'right',
					'float'=>'left',
					'width'=>'90px',
					'height'=>'34px',
					'line-height'=>'34px',
					'margin-right'=>'10px',
					]],
			
					])->input("checkbox",['class'=>'ace ace-switch ace-switch-4',]) ;
			echo '</div>';	

		}
		
	?>
	
	<?= Html::input("hidden",'action','alter') ?>
	<?= Html::input("hidden",'alterid',$id) ?>
	<?php ActiveForm::end()  ?>	
</div>

<!-- #alter dialog-message -->

	



	